package com.dengke.springmybatis.dao;

import com.dengke.springmybatis.pojo.City;
import com.dengke.springmybatis.pojo.CityExample;
import com.dengke.springmybatis.pojo.CityInfo;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface CityMapper {
    long countByExample(CityExample example);

    int deleteByExample(CityExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(City record);

    int insertSelective(City record);

    List<City> selectByExample(CityExample example);

    City selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") City record, @Param("example") CityExample example);

    int updateByExample(@Param("record") City record, @Param("example") CityExample example);

    int updateByPrimaryKeySelective(City record);

    int updateByPrimaryKey(City record);
    
    List<City> selectTop100City();
    
    List<String> selectCountryCode();
    
    /***
     * 根据Id查询city的详细信息
     * @param id
     * @return
     */
    //result type
    CityInfo selectCityInfoById(int id);
    
    //result map
    City selectCityById(int id);
}